<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ES6模块化</title>
</head>

<body>
    <script type="module">
        //1.通用引入方法引入m1.js 模块内容
        /*  import * as m1 from './src/m1.js';
         console.log(m1); */

        //2.解构赋值的方式引入
        import { school, teach } from './src/m1.js';
        //重名的要取别名
        import { school as guigu, teach as jiao } from './src/m1.js';

        //引入默认暴露的固定写法,必须给default取别名
        import { default as m3 } from './src/m1.js';
       
        //3.简便形式引入， 针对默认暴露
        import m3 from './src/m1.js'
    </script>
</body>

</html>